package com.chilly.bean;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * 不建议使用。因为这样会将Bean的实现和Spring框架耦合在一起。
 * <p>
 * Created by Chilly Cui on 2020/9/25.
 */
public class GiraffeService3 {

    @PreDestroy
    public void destroyMethod() throws Exception {
        System.out.println("执行配置的destroy-method");
    }

    @PostConstruct
    public void initMethod() throws Exception {
        System.out.println("执行配置的init-method");
    }

}
